package temp.lho.lws.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import temp.lho.lws.pojo.TbUser;
import temp.lho.lws.service.IUserService;
import temp.lho.lws.vo.LayuiResult;

import java.util.List;

/**
 * @author liuws
 * @create 2020-07-05 15:36
 */
@RestController
@RequestMapping("/admin/user")
public class AdminUserController {

    @Autowired
    private IUserService userService;

    @GetMapping("/userInfo")
    public LayuiResult findAllUser() {
        List<TbUser> users = userService.findAll();
        LayuiResult layuiResult = new LayuiResult(0, "", users.size(), users);
        return layuiResult;
    }

}
